home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
prog
/
iconp.zip
/
LAM.ICN
< prev
next >
Wrap
Text File
|
1987-05-29
|
969b
|
51 lines
# LAM(1)
#
# Laminate files
#
# Thomas R. Hicks
#
# Last modified 7/28/83
#
global fndxs
procedure main(a)
local bufs, i
bufs := list(*a)
fndxs := []
if (*a = 0) | a[1] == "?" then Usage()
every i := 1 to *a do {
if a[i] == "-" then {
a[i] := &input
put(fndxs,i)
}
else if match("-",a[i]) then {
bufs[i] := a[i][2:0]
a[i] := &null
}
else {
if not (a[i] := open(a[i])) then
stop("Can't open ",a[i])
else put(fndxs,i)
}
}
if 0 ~= *fndxs then lamr(a,bufs) else Usage()
end
procedure lamr(args,bufs)
local i, j
every i := !fndxs do
bufs[i] := (read(args[i]) | &null)
while \bufs[!fndxs] do {
every j := 1 to *bufs do
writes(\bufs[j])
write()
every i := !fndxs do
bufs[i] := (read(args[i]) | &null)
}
end
procedure Usage()
stop("usage: lam file [file | -string]...")
end